/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.transportes.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import pe.com.transportes.modelo.Asistente;

/**
 *
 * @author PFR
 */
public class AsistenteDAO {


      public void insertarasistente(Connection con,Asistente c) throws SQLException{

    String sql ="insert into asistente values (?,?,?,?,?,?,?,?)";
    PreparedStatement ps = con.prepareStatement(sql);


    System.out.println("codigo dao "+c.getCod_asistente());

    ps.setString(1,c.getCod_asistente());
             ps.setString(2,c.getNom_asistente());
        ps.setString(3,c.getApe_asistente());
        ps.setInt(4,c.getTelefono());
        ps.setString(5,c.getFnacimiento());
        ps.setDouble(6, c.getSueldo());
   ps.setInt(7, c.getEdad());
   ps.setString(8, c.getTurno());
    ps.executeUpdate();
    }





}
